/**
 * Copyright 2008 Matthew Purland (m.purland@gmail.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.variance.version;

import org.variance.version.data.RevisionData;
import org.variance.version.diff.Differentiable;
import org.variance.version.identifier.RevisionIdentifier;

/**
 * Revision of an object. This interface defines that the object that implements
 * this interface has, or can have a revision associated to it. This defines a
 * revisionable object at a specific revision.
 *
 * This is not defined as {@link Differentiable} because not all objects that
 * are revisioned will be able to be differentiated.  Only objects with registered
 * differentiators will be able to be process differences.
 *
 * @author Matthew Purland
 *
 * @see RevisionHistory
 * @see Differentiable
 */
public interface Revision {
    /**
     * Get the revision identifier for comparing.
     *
     * If the retrieved revision identifier is null then the revision has not
     * been committed yet through a {@link ChangeSet}.
     */
    RevisionIdentifier getRevisionIdentifier();

    /**
     * Get the revision data associated with the revision.
     * @todo What kind of security will be in place for securing  data is 100% correct?
     */
    RevisionData getRevisionData();
}
